﻿
@{
    ViewBag.Title = "ForgotPass2";
    Layout = "~/Views/shard/_layout.cshtml";
}
<div class="headertwo clearfloat" id="header">
    <a href="javascript:history.go(-1)" class="fl box-s"><i class="iconfont icon-arrow-l fl"></i></a>
    <p class="fl">短信验证</p>
</div>

<div class="modify clearfloat" id="main">
    <ul>
        <li class="clearfloat">
            <input type="text" name="" id="yan" value="" placeholder="请输入手机短信中的验证码" class="sname" />
        </li>
    </ul>
    <a href="#" id="next" class="pay-btn clearfloat">
        验证
    </a>
</div>
@section footerjs{
    <script type="text/javascript">
        $(function () {
            $('#next').click(function () {
                var yan = $('#yan').val();
                $.ajax({
                    url: '/User/ForgotPass2',
                    data: {yan: yan},
                    dataType: 'json',
                    type: 'post',
                    success: function (res) {
                        if (res.status == 'ok') {
                            window.location.href = "/User/ForgotPass3";
                        } else {
                            window.location.href = "/User/ForgotPass1";
                        }
                    },
                    error: function () {
                        alert("网络请求错误");
                    }
                })
            })
        })
    </script>
}
